<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <button id="btn">提交</button>
    <script>
      const btn = document.getElementById("btn");

      const f1 = function () {
        console.log(1);
      };
      const f2 = function () {
        console.log(2, this);
      };
      // 事件处理函数队列（数组）
      // btn.eventClick = [f1, f2];
      btn.addEventListener("click", f1);
      btn.addEventListener("click", f2);

      setTimeout(() => {
        btn.removeEventListener("click", f1); // [f2]
        btn.removeEventListener("click", f2); // []
      }, 3000);
    </script>
  </body>
</html>
